package cn.bdqn.pn.service.order.OrderServiceImpl;

import cn.bdqn.pn.pojo.order.ChildOrder;
import cn.bdqn.pn.pojo.schedule.Seat;
import cn.bdqn.pn.reposity.order.ChildOrderReposity;
import cn.bdqn.pn.reposity.schedule.SeatDao;
import cn.bdqn.pn.service.order.ChildOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service("childOrderService")
public class ChildOrderServiceImpl implements ChildOrderService {

    @Autowired
    ChildOrderReposity childOrderReposity;
    @Autowired
    SeatDao seatDao;

    @Override
    public Map<String,Object> findChidlOrderByOrderNum(String orderNum) {
        Map map=new HashMap();
        ChildOrder childOrder=childOrderReposity.findChidlOrderByOrderNum(orderNum);
        map.put("childOrder",childOrder);
        Seat seat=seatDao.findOne(childOrder.getSeatId());
        map.put("seat",seat);
        return map;
    }
}
